#include<stdio.h>
#include<stdlib.h>
typedef struct Node
{
    int data;
    struct Node *next;
}Node,*LinkedList;
LinkedList listinit()
{
    Node *L;
    L=(Node*)malloc(sizeof(Node));
    if(L==NULL)
    {
    puts("memery wrong");
    exit(0);
    }
    L->next=NULL;
}
LinkedList LinkedList1()
{
    Node *L;
    L=(Node*)malloc(sizeof(Node));
    L->next=NULL;
    int x;
    while(scanf("%d",&x)!=EOF)
    {
        Node *p;
        p=(Node*)malloc(sizeof(Node));
        p->data=x;
        p->next=L->next;
        L->next=p;
    }
    return L;
}
void printList(LinkedList L)
{
    Node *p=L->next;
    int i=0;
    while(p)
    {
        printf("%d %d\n",++i,p->data);
    }
}
int main()
{
    LinkedList1();
    printList(LinkedList1);
    return 0;
}